package com.bkaka.service.impl;

import com.bkaka.dao.ExamSubjectDao;
import com.bkaka.entity.ExamSubject;
import com.bkaka.service.ExamSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by maxiaoqiang on 2018/9/3.
 */

@Service
public class ExamSubjectImpl implements ExamSubjectService {

    @Autowired
    private ExamSubjectDao subjectDao;

    @Override
    public List<ExamSubject> findAll() {
        return subjectDao.findAll();
    }

    @Override
    public List<ExamSubject> findSubjectChapter() {
        return subjectDao.findSubjectChapter();
    }

    @Override
    public void create(ExamSubject category) {
        subjectDao.create(category);
    }

    @Override
    public boolean delete(Integer id) {
        return subjectDao.delete(id);
    }

    @Override
    public void update(ExamSubject category) {
        subjectDao.update(category);
    }

    @Override
    public List<ExamSubject> findByCategory(Integer id) {
        return subjectDao.findByCategory(id);
    }

    @Override
    public ExamSubject findById(Integer id) {
        return subjectDao.findById(id);
    }
}
